package org.easyframework.core.utils;

import java.io.Serializable;

/**
 * @Description: 查询条件基础类
 * @author: daiw
 * @date: 2018年10月13日 下午12:11:09
 */
public class QueryParam  implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3007277661325893640L;
	private int pageIndex=1;
	private int pageSize=10;

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		if(pageIndex==0){
			pageIndex=1;
		}
		this.pageIndex = pageIndex;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		if(pageSize==0){
			pageSize=10;
		}
		this.pageSize = pageSize;
	}

	public int getOffset() {
		return (this.pageIndex - 1) * this.pageSize;
	}

}
